<template>
  <div>
    <img class="img-help" src="../assets/images/help.png" alt />
    <div class="breadcrumb-box">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>{{articleInfo.title || '文章详情'}}</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <div class="help container">
      <div class="line-ti td-fsc">
        <div>{{articleInfo.title}}</div>
      </div>
      <div class="issue-detail">
        <!-- <img :src="articleInfo.image_input" /> -->
        <div v-html="articleInfo.content"></div>
      </div>
    </div>
  </div>
</template>

<script>
import { platformArticleInfo } from "@api/public";

export default {
  data() {
    return {
      id: "",
      articleInfo: {},
    };
  },
  created() {
    if (this.$route.query.id) {
      this.id = this.$route.query.id;
    }
  },
  methods: {
    getDetail() {
      platformArticleInfo(this.id).then(
        (res) => {
          this.articleInfo = res.data;
          document.title = res.data.title;
        },
        (error) => {
          this.$dialog.message(error.msg);
        }
      );
    },
  },
  mounted() {
    this.getDetail();
  },
};
</script>

<style scoped  rel="stylesheet/scss" lang="scss" scoped>
$color: #DA213D;

.img-help {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}

.help {
  padding: 40px 0 160px;
  .line-ti {
    width: 100%;
    border-bottom: 1px solid #dbdbdb;
    margin-bottom: 30px;
    > div {
      color: #014a97;
      font-size: 20px;
      font-family: MicrosoftYaHei-Bold;
      border-bottom: 3px solid $color;
      line-height: 36px;
      font-weight: 600;
      padding: 0 10px;
    }
  }

  .list-help {
    margin-top: 32px;

    ul {
      li {
        list-style-type: none;
        font-size: 16px;
        color: #333333;
        padding: 20px 0;
        border-bottom: dashed #eee 1px;
        cursor: pointer;
        > div {
          font-size: 15px;
          color: #333333;
        }
        > div:hover {
          color: $color;
        }
        > span {
          font-size: 13px;
          color: #999;
          display: block;
          width: 120px;
          text-align: right;
        }
      }
    }
  }
  .issue-detail {
    font-size: 15px;
    line-height: 2;
    color: #666;
    padding: 20px 10px;
    ::v-deep img {
      max-width: 100%;
    }
    ::v-deep span {
      font-size: 16px;
      line-height: 1.6;
    }
  }
}
</style>